<?php
$id=$_GET['id'];
$title1=$_GET['title'];
$author1=$_GET['author'];
$web1=$_GET['web'];
$connect=mysql_connect("localhost","root","192510");
mysql_select_db("news",$connect);
$sql="select * from wangzhan where id='{$id}'";
$result = mysql_query($sql);
$row=mysql_fetch_array($result);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.6.3.min.js"></script>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">新闻管理</a></li>
	<li><a href="#">添加网址</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>网址信息</span></div>
    <form method="post" action="insert_web_commit.php">
    <ul class="forminfo">
    <li>
    	<label>标题</label><input  name="title" onblur="new_name();"   id="title" class="dfinput"/>
    	<i style="margin-right:20px;display:none;" id="yz_title">网址不能为空</i>
    </li>
    <li>
    	<label>&nbsp;</label><input  type="submit" name="submit" class="btn" value="确认保存" onclick="return tijiao();"/>
    </li>
    </ul>
	</form>
    </div>
</body>
</html>
<script>
       
 function new_name(){
		   var title=$("#title").val();
		   if(title==null||title.length==0){
			   $("#yz_title").show();
		   }else{
			    $("#yz_title").hide();
		   }	   
 }

function tijiao(){
		 
		     var title=$("#title").val();
			 if(title==null||title.length==0){
				 alert("网站地址不能为空");
				 return false;
				 
			 }else{
				 
				 return true;
				
			 }
		   
		   
		   
	   }

</script>